package cn.edu.scau.cmi.xiaozecheng.spring.util;

import org.springframework.context.ApplicationContext;

import cn.edu.scau.cmi.xiaozecheng.spring.domain.Student;

public class Test {
	public static void main(String[] args) {
    	ApplicationContext appclication = ApplicationContextUtil.getApplicationContext();
    	Student zhangsan = (Student) appclication.getBean("zhangsan");
    	System.out.println(zhangsan.getName()+"的导师是："+zhangsan.getTutor().getName());
    	System.out.println(appclication.getBean("StudentDAO"));
    	System.out.println(appclication.getBean("TeacherDAO"));
    }
}
